package com.itheima.mapper;

import com.itheima.common.entity.QueryPageBean;
import com.itheima.pojo.CheckGroup;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CheckGroupMapper {
    @Insert("insert into t_checkgroup(code,name,sex,remark,attention) " +
            "values(#{code},#{name},#{sex},#{remark},#{attention})")
    void add(CheckGroup checkGroup);

    List<CheckGroup> selectByCondition(QueryPageBean queryPageBean);
@Delete("delete from t_checkgroup where id=#{id}")
    void delete(Integer id);
@Update("update t_checkgroup set code=#{code},name=#{name},sex=#{sex},remark=#{remark},attention=#{attention}" +
        " where id=#{id}")
    void edit(CheckGroup checkGroup);
@Select("select * from t_checkgroup where id=#{id}")
    CheckGroup findById(Integer id);
@Select("select * from t_checkgroup")
    List<CheckGroup> findAll();
}
